script_name("TaxiLightsFix")
script_author("Seven Memz")

function main()
    while true do
        wait(0)
        if isCharInTaxi(playerPed) then
            local hours, min = getTimeOfDay()
            if hours >= 21 or hours <= 6 then
                setTaxiLights(storeCarCharIsInNoSave(playerPed), true)
            else
                setTaxiLights(storeCarCharIsInNoSave(playerPed), false)
            end
        end
    end
end